<div class="configurations form">
<h2><?php echo __d('configurations','Edit Configuration'); ?></h2>
	<div class="clear"></div>
	<div class="actions selected">
		<?php 
			$domain_id = $this->Form->value('Configuration.domain_id'); if(!empty($domain_id)) echo $this->Html->link(__d('configurations','Cancel'), array('controller'=>'domains','action' => 'view',$domain_id,'d'=>'settings'), array('class'=>'action-left'));
			echo $this->Form->postLink(__d('configurations','Delete'), array('action' => 'delete', $this->Form->value('Configuration.id'),'d'=>$domain_id), array('style'=>'margin-right: 25px;','class'=>'action-right'), __d('configurations','Are you sure you want to delete # %s?', $this->Form->value('Configuration.id'))); 
		?>
	</div>
	<div class="clear"></div>

	
<?php echo $this->Form->create('Configuration', array('type' => 'file'));?>
	<fieldset>
	
	<?php
		echo $this->Form->input('id');
		echo $this->Form->hidden('domain_id');
		echo $this->Form->hidden('cfg_group_id',array('options'=>Configure::read('Config.cfg_groups')));
		switch($this->Form->value('Configuration.cfg_group_id')){
			case 1:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('after'=>__d('configurations','for empty value write: null')));
				break;
			case 2:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('label'=>__d('configurations','Url'),'after'=>__d('configurations','example: http://www.google.com')));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__d('configurations','Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__d('configurations','Select new file')));
				echo $this->Form->input('Upload.description');
				break;
			case 3:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Social media ID')));
				echo $this->Form->input('value',array('after'=>__d('configurations','number or address obtained from a social network')));
				break;
			case 4:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Google search engine')));
				echo $this->Form->input('value',array('after'=>__d('configurations','Javascript obtained from the search engine google')));
				break;
			case 5:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->hidden('value',array('value'=>'null'));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__d('configurations','Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__d('configurations','Select new file'),'after'=>__d('configurations','Background image for the category list on the home page')));
				echo $this->Form->input('Upload.description');
				break;
			case 6:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Global Meta tags')));
				echo $this->Form->input('value',array('after'=>h(__d('configurations','Additional meta tags installed on the page, example: <meta name="Language" content="pl" />'))));
				break;
			case 7:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Footer text')));
				echo $this->Form->input('value',array('after'=>h(__d('configurations','example: Copyright &copy by SEO Solution'))));
				break;
			case 8:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('after'=>__d('configurations','style formating, example: background-position: center; style="background-position: center; background-color: #ffffff; background-repeat: no-repeat;')));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__d('configurations','Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__d('configurations','Select new file'),'after'=>__d('configurations','image for the all pages')));
				echo $this->Form->input('Upload.description');
				break;
			case 9:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Footer text')));
				echo $this->Form->input('value',array('type'=>'checkbox','after'=>h(__d('configurations','Display/Hide'))));
				break;
			case 10:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__d('configurations','Footer text')));
				echo $this->Form->input('value',array('type'=>'text','after'=>h(__d('configurations','konto pocztowe do obsługi formularza kontaktowego'))));
				break;
		}
	?>
	</fieldset>
<?php echo $this->Form->end(__d('configurations','Submit'));?>
</div>
<?php echo $this->element('/menu/left')?>

